package graphics.transformations;

import static org.junit.Assert.assertTrue;
import static util.MatrixOperationsF.add;
import static util.MatrixOperationsF.multiply;

import org.junit.Test;

import util.MatrixOperationsF;

public class MatrixTest {
	/**
	 * 
	 */
	@Test
	public void testAdd0() {
		float[] array0 = { 1, 2, 3 };
		float[] array1 = { 4, 5, 6 };
		float[] result = { 5, 7, 9 };
		assertTrue(MatrixOperationsF.equals(add(array0, array1), result));
	}

	@Test
	public void testMultiplication0() {
		float[][] M1 = { { 1, 2, 3 }, { 4, 5, 6 } };
		float[][] M2 = { { 9, 8 }, { 7, 6 }, { 5, 4 } };
		float[][] Mr = { { 38, 32 }, { 101, 86 } };
		assertTrue(MatrixOperationsF.equals(multiply(M1, M2), Mr));
	}
}
